import request from '@/utils/request'

// 查询客户薪资记录列表
export function listSalary(query) {
  return request({
    url: '/hrcrm/salary/list',
    method: 'get',
    params: query
  })
}

// 查询客户薪资记录详细
export function getSalary(id) {
  return request({
    url: '/hrcrm/salary/' + id,
    method: 'get'
  })
}

// 新增客户薪资记录
export function addSalary(data) {
  return request({
    url: '/hrcrm/salary',
    method: 'post',
    data: data
  })
}

// 修改客户薪资记录
export function updateSalary(data) {
  return request({
    url: '/hrcrm/salary',
    method: 'put',
    data: data
  })
}

// 删除客户薪资记录
export function delSalary(id) {
  return request({
    url: '/hrcrm/salary/' + id,
    method: 'delete'
  })
}

// 批量审核打卡记录
export function audits(id) {
  return request({
    url: '/hrcrm/salary/audits/' + id,
    method: 'put'
  })
}

// 批量结算
export function settle(id) {
  return request({
    url: '/hrcrm/salary/settle/' + id,
    method: 'put'
  })
}

// 批量发薪
export function grant(id) {
  return request({
    url: '/hrcrm/salary/grant/' + id,
    method: 'put'
  })
}
